"use strict";

module.exports = app => {
  const { router, controller } = app;
  router.post("/api/web/blogIndex", controller.webApi.indexPage);
  router.get("/api/web/category", controller.webApi.getAllCategory);
  router.get("/api/web/blogs/:blogId", controller.webApi.blogShow);
  router.get(
    "/api/web/getBlogsGroupByCategory",
    controller.webApi.getBlogsGroupByCategory
  );
  router.get(
    "/api/web/getBlogsByCategoryId",
    controller.webApi.getBlogsByCategoryId
  );
  router.get(
    "/api/web/category/:categoryId",
    controller.webApi.getCategoryById
  );
  router.get("/api/web/getBlogAndTagNum", controller.webApi.getBlogAndTagNum);
};
